#include "iTubeFrame.h"
#include "iTubePanel.h"
#include "iTubeAbout.h"
#include "iTubeOptions.h"


BEGIN_EVENT_TABLE( iTubeFrame, MainFrame )
	EVT_MENU( ID_FILE_EXIT, iTubeFrame::OnExit )
	EVT_MENU( ID_HELP_ABOUT, iTubeFrame::OnAbout )
	EVT_MENU( ID_TOOLS_OPTIONS, iTubeFrame::OnOptions )
END_EVENT_TABLE()

iTubeFrame::iTubeFrame( wxWindow *parent, int id )
	: MainFrame( parent, id )
{
	wxBoxSizer* sizer = new wxBoxSizer( wxVERTICAL );
	wxPanel* panel = new iTubePanel( this );
	sizer->Add( panel, 1, wxEXPAND );
	wxSize panelSize = panel->GetSize();
	this->SetSizerAndFit( sizer );
	this->SetClientSize( panelSize );	
}

void iTubeFrame::OnExit( wxCommandEvent& event )
{
	Close();
}

void iTubeFrame::OnAbout( wxCommandEvent& event )
{
	iTubeAbout* about = new iTubeAbout( this );
	about->Show();
}

void iTubeFrame::OnOptions( wxCommandEvent& event )
	{
	iTubeOptions* options = new iTubeOptions( this );
	options->Show();
	}




iTubeFrame::~iTubeFrame()
{
}